Integrand size = 23, antiderivative size = 170 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=-\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)}+\frac {2 i a^2 f \cosh \left (e-\frac {c f}{d}\right ) \text {Chi}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {a^2 f \text {Chi}\left (\frac {2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{d^2}+\frac {2 i a^2 f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {a^2 f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{d^2} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3399, 3394, 3384, 3379, 3382} \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=-\frac {a^2 f \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{d^2}+\frac {2 i a^2 f \text {Chi}\left (x f+\frac {c f}{d}\right ) \cosh \left (e-\frac {c f}{d}\right )}{d^2}+\frac {2 i a^2 f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (x f+\frac {c f}{d}\right )}{d^2}-\frac {a^2 f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{d^2}-\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{d (c+d x)} \]
[In]
[Out]
Rule 3379
Rule 3382
Rule 3384
Rule 3394
Rule 3399
Rubi steps \begin{align*} \text {integral}& = \left (4 a^2\right ) \int \frac {\sin ^4\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right )}{(c+d x)^2} \, dx \\ & = -\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)}+\frac {\left (8 i a^2 f\right ) \int \left (\frac {\cosh (e+f x)}{4 (c+d x)}+\frac {i \sinh (2 e+2 f x)}{8 (c+d x)}\right ) \, dx}{d} \\ & = -\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)}+\frac {\left (2 i a^2 f\right ) \int \frac {\cosh (e+f x)}{c+d x} \, dx}{d}-\frac {\left (a^2 f\right ) \int \frac {\sinh (2 e+2 f x)}{c+d x} \, dx}{d} \\ & = -\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)}-\frac {\left (a^2 f \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d}+\frac {\left (2 i a^2 f \cosh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d}-\frac {\left (a^2 f \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d}+\frac {\left (2 i a^2 f \sinh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d} \\ & = -\frac {4 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)}+\frac {2 i a^2 f \cosh \left (e-\frac {c f}{d}\right ) \text {Chi}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {a^2 f \text {Chi}\left (\frac {2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{d^2}+\frac {2 i a^2 f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {a^2 f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{d^2} \\ \end{align*}
Time = 0.80 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.26 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=\frac {a^2 \left (-3 d+d \cosh (2 (e+f x))+4 i f (c+d x) \cosh \left (e-\frac {c f}{d}\right ) \text {Chi}\left (f \left (\frac {c}{d}+x\right )\right )-2 f (c+d x) \text {Chi}\left (\frac {2 f (c+d x)}{d}\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )-4 i d \sinh (e+f x)+4 i c f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )+4 i d f x \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )-2 c f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )-2 d f x \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )\right )}{2 d^2 (c+d x)} \]
[In]
[Out]
Time = 2.41 (sec) , antiderivative size = 313, normalized size of antiderivative = 1.84
method | result | size |
risch | \(-\frac {i a^{2} f \,{\mathrm e}^{f x +e}}{d^{2} \left (\frac {c f}{d}+f x \right )}-\frac {i a^{2} f \,{\mathrm e}^{-\frac {c f -d e}{d}} \operatorname {Ei}_{1}\left (-f x -e -\frac {c f -d e}{d}\right )}{d^{2}}-\frac {3 a^{2}}{2 d \left (d x +c \right )}+\frac {f \,a^{2} {\mathrm e}^{-2 f x -2 e}}{4 d \left (d f x +c f \right )}-\frac {f \,a^{2} {\mathrm e}^{\frac {2 c f -2 d e}{d}} \operatorname {Ei}_{1}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right )}{2 d^{2}}+\frac {f \,a^{2} {\mathrm e}^{2 f x +2 e}}{4 d^{2} \left (\frac {c f}{d}+f x \right )}+\frac {f \,a^{2} {\mathrm e}^{-\frac {2 \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-2 f x -2 e -\frac {2 \left (c f -d e \right )}{d}\right )}{2 d^{2}}+\frac {i a^{2} f \,{\mathrm e}^{-f x -e}}{d \left (d f x +c f \right )}-\frac {i a^{2} f \,{\mathrm e}^{\frac {c f -d e}{d}} \operatorname {Ei}_{1}\left (f x +e +\frac {c f -d e}{d}\right )}{d^{2}}\) | \(313\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.56 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=\frac {{\left (a^{2} d e^{\left (4 \, f x + 4 \, e\right )} - 4 i \, a^{2} d e^{\left (3 \, f x + 3 \, e\right )} + 4 i \, a^{2} d e^{\left (f x + e\right )} + a^{2} d - 2 \, {\left (3 \, a^{2} d + {\left (a^{2} d f x + a^{2} c f\right )} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (d e - c f\right )}}{d}\right )} + 2 \, {\left (-i \, a^{2} d f x - i \, a^{2} c f\right )} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (\frac {d e - c f}{d}\right )} + 2 \, {\left (-i \, a^{2} d f x - i \, a^{2} c f\right )} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-\frac {d e - c f}{d}\right )} - {\left (a^{2} d f x + a^{2} c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )}\right )} e^{\left (2 \, f x + 2 \, e\right )}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{4 \, {\left (d^{3} x + c d^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=- a^{2} \left (\int \frac {\sinh ^{2}{\left (e + f x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \left (- \frac {2 i \sinh {\left (e + f x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\right )\, dx + \int \left (- \frac {1}{c^{2} + 2 c d x + d^{2} x^{2}}\right )\, dx\right ) \]
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.08 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=\frac {1}{4} \, a^{2} {\left (\frac {e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} E_{2}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} + \frac {e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} E_{2}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} - \frac {2}{d^{2} x + c d}\right )} + i \, a^{2} {\left (\frac {e^{\left (-e + \frac {c f}{d}\right )} E_{2}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} - \frac {e^{\left (e - \frac {c f}{d}\right )} E_{2}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d}\right )} - \frac {a^{2}}{d^{2} x + c d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1134 vs. \(2 (159) = 318\).
Time = 0.34 (sec) , antiderivative size = 1134, normalized size of antiderivative = 6.67 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^2} \, dx=\int \frac {{\left (a+a\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2}{{\left (c+d\,x\right )}^2} \,d x \]
[In]
[Out]